package com.common.www.bean.entity.tabulation;


import org.springframework.boot.base.jpa.domain.annotations.QueryCacheable;
import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.common.www.bean.entity.project.Project;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * 消防工程-标底清单
 *
 * @param
 * @author andyliu
 * @date 5/28/2018 4:23 PM
 * @return
 */
@DynamicUpdate(true)
@DynamicInsert(true)
@Entity
@Getter
@Setter
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table()
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "消防工程标底清单参数")
@JsonIgnoreProperties(ignoreUnknown=true)
public class XfgcBidBaseTabulation extends NumberIdentityEntity {
    /**
     * 参加阶段；1.标底 2.回标1 3.回标2 4.回标3 5.定标
     */
    @Column(length = 11)
    private Integer jieDuan;
    /**
     * 参与项目
     */
    @JsonIgnoreProperties(value = {""})
    @ManyToOne()
    private Project project;

    /**
     * 名称类型1(HZ.火灾报警系统  GB.消防广播系统  XHS.消火栓系统  ZB.增补清单)。
     */
    @Column(length = 128)
    private String nameType1;
    /**
     * 名称类型2(名称类型1为增补清单时HZ.火灾报警系统  GB.消防广播系统  XHS.消火栓系统)。
     */
    @Column(length = 128)
    private String nameType2;
    /**
     * 序号归属类型(最后一级归属于对应的系统)
     */
    @Column(length = 128)
    private String codeNumberType;

    /**
     * 序号
     */
    @Column(length = 64)
    private String codeNumber;
    /**
     * 名称
     */
    @Column(length = 128, nullable = false)
    private String name;
    /**
     * 系统分类
     * HZ.火灾报警系统  GB.消防广播系统  XHS.消火栓系统  PL.自动喷淋系统  YY.余压监控系统  MHQ.灭火器系统  JL.防火卷帘系统  QT.气体灭火系统
     * FHM.防火门监控系统  DYJK.消防设备电源监控系统  HZJK.电气火灾监控系统  YJZM.集中控制型应急照明系统  LX.零星其他系统  XFJC.消防检测及验收
     * KZZJ.抗震支架系统  WB.质保期内维保 ZB.增补清单(增补清单不作为系统分类)
     */
    @Column(length = 36)
    private String xiTongFenLei;
    /**
     * 分析分类1(eg:消防电系统)
     */
    @Column(length = 128)
    private String fenXiFenLei1;
    /**
     * 分析分类2(eg:电系统设备)
     */
    @Column(length = 128)
    private String fenXiFenLei2;
    /**
     * 规格型号
     */
    @Length(max=128,message = "型号最长不超过128位")
    @Column(length = 128)
    private String modelCode;
    /**
     * 项目特征及主要工程内容
     */
    @Column(columnDefinition = "TEXT")
    private String teZhengNeiRong;
    /**
     * 单位（eg:台、个）
     */
    @Column(length = 32)
    private String unit;
    /**
     * 品牌
     */
    @Column(length = 64)
    private String brand;
    /**
     * 主材供应方式
     */
    @Column(length = 64)
    private String zhuCaiGongYing;
    /**
     * 工程量汇总
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangHuiZong;
    /**
     * 工程量-地下室
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangDiXiShi;
    /**
     * 工程量-高层
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangGaoCeng;
    /**
     * 工程量-小高层
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangXiaoGaoCeng;
    /**
     * 工程量-洋房
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangYangFang;
    /**
     * 工程量-商业
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangShangYe;
    /**
     * 工程量-总平
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangZongPing;
    /**
     * 工程量-别墅
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangBieShu;
    /**
     * 工程量-公寓
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangGongYu;
    /**
     * 工程量-幼儿园
     */
    @Column(length = 11, precision = 12, scale = 2)
    private BigDecimal gongChengLiangYouErYuan;
    /**
     * 综合单价1(新项目不含增值税)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal comprehensivePriceBhs;
    /**
     * 综合单价2(新项目含增值税)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal comprehensivePriceHs;
    /**
     * 人工费
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal renGongCost;
    /**
     * 主材费(含损耗费)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal zhuCaiCost;
    /**
     * 辅材及其他材料费
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal fuCaiCost;
    /**
     * 机械费
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal jiXieCost;
    /**
     * 企业管理费、利润、规费等
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal qiYeCost;
    /**
     * 增值税专用发票税额
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal shuiJin;
    /**
     * 企业管理费、利润、规费等--公式填写值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal qiYeCostFillIn;
    /**
     * 增值税专用发票税额--公式填写值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal shuiJinFillIn;
    /**
     * 合价-不含增值税
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPriceBhs;
    /**
     * 合价-含增值税
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPriceHs;
    /**
     * 合价-含增值税(地下室合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice1;
    /**
     * 合价-含增值税(高层合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice2;
    /**
     * 合价-含增值税(小高层合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice3;
    /**
     * 合价-含增值税(洋房合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice4;
    /**
     * 合价-含增值税(商业合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice5;
    /**
     * 合价-含增值税(总平合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice6;
    /**
     * 合价-含增值税(别墅合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice7;
    /**
     * 合价-含增值税(公寓合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice8;
    /**
     * 合价-含增值税(幼儿园合计)
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal totalPrice9;
    /**
     * 备注
     */
    @Column(columnDefinition = "TEXT")
    private String remarks;
    //===============================
    /**
     * 企业管理费、利润、规费等-计算值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal qiYeCalcd;
    /**
     * 税金-计算值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal shuiJinCalcd;
    /**
     * 综合单价1(新项目不含增值税)-计算值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal comprehensivePriceBhsCalcd;
    /**
     * 综合单价2(新项目含增值税)-计算值
     */
    @Column(length = 11, precision = 12, scale = 4)
    private BigDecimal comprehensivePriceHsCalcd;

}